Drawing commands are the primitive instructions used by a computer application to display graphical representations of images. Drawing commands are rendered and displayed in Z-order (from bottom to top). Drawing commands define the characteristics of the object to be rendered, as well as its interaction with previously drawn (rendered) objects. Rendering systems may be implemented in specific hardware devices, configured either in computers or printers, or in software typically implemented in general purpose computers, or a combination of both.
Transparency is used to combine two objects into a single result. Typically transparency is specified in a separate channel known as the Alpha (α) channel. The α channel specifies what percentage of the Drawing command will be visible versus what percentage of background, being that over which the Drawing command is rendered, will be visible.
Modern page description languages (PDLs), such as PDF, support an α channel for objects to allow them to be blended with objects below in the Z-order. When an object with transparency is given to a renderer, the renderer will typically blend or composite the object with its background using the following formula:Ri=αSi+(1−α)Di  Equation 1where:                Si is a channel from source object,        Di is the corresponding channel of the destination (or background) prior to compositing,        α is the Alpha value (from 0.0 to 1.0)        Ri is the corresponding channel of the result.        
Using the above equation ensures that each pixel contains a contribution from both the object and the background proportionally based on the Alpha value.
However, some legacy drawing interfaces such as Graphics Device Interface (GDI) and Page Description Languages (PDLs) such as PostScript™ do not support transparency.
These interfaces for example can simulate transparency interleaving two objects together at a high resolution. Each pixel will either be from the object or from the background (no mixing per pixel), where the probability of using the object instead of the background is based on the percentage of transparency being simulated. For example with a 50% transparency, half of the pixels will be from the object and half the pixels from the background. With a 90% transparency, 10% of the pixels will be from the object and 90% of the pixels will be background. When the high resolution interleaved objects are viewed by the human eye, the objects will appear from a distance to be blended together.
Legacy applications, such as FrameMaker™ 5.0 (Adobe Corporation) and Word™ 2003 (Microsoft Corp.), use high resolution interleaving in order to simulate a transparency effect. However, this high resolution interleaving results in using a mask that adds artefacts to the output. The artefacts may be visible if the output is viewed closely or zoomed in. Also, the operation of interleaving may slow down the performance of the graphics renderer, as well as consume more memory.
Raster Operations (ROPs) are used in rendering to describe the relationship between source and destination components. Binary Raster Operations (ROP2s) involve two arguments (source, destination). Ternary Raster Operations (ROP3s) are used to combine a source image with a destination image using a pattern mask and binary operators. Binary operators are defined by ROP3 operation codes, which define the Boolean operation between the source image, the destination image and the pattern mask. For the purposes of interleaving pixels between source image and destination image, ROP3 with operation codes 0xCA and 0xAC are used.
Operation code 0xCA defines the following logic (in Reverse Polish Notation):                DPSDxax        
Operation code 0xAC defines the following logic (in Reverse Polish Notation):                SPDSxaxwhere:        S is the source image data;        D is the destination image data;        P is the pattern mask;        x is an XOR operator; and        a is an AND operator.        
Operation code 0xCA for example may therefore be expressed traditionally as:D XOR(P AND(S XOR D)).
A ROP3 0xCA or ROP3 0xAC command will select either the source image or the destination image based on the pattern mask. For ROP3 0xCA, if the pattern mask is 1, the source image is selected otherwise the destination image is selected. For ROP3 0xAC, if the pattern mask is 1, the destination image is selected otherwise the source image is selected.
In complex rendering systems, graphics data must be compressed so that memory is not exhausted. This means that a rendering system will typically compress input images as they are received. The compression of image data is typically more efficient when the image data is converted into its spatial frequency coefficients. The Discrete Cosine Transform (DCT) provides a means of converting spatial data into spatial frequency coefficients. DCT is a subset of the Discrete Fourier Transform (DFT). It is commonly used in image processing methods to represent images since its values are easier to compress. Image processing systems typically convert pixel data to DCT to facilitate reduction of memory usage. The DCT is defined using the following equation:
                              F          ⁡                      (                          s              ,              t                        )                          =                              1                          Max              ⁡                              (                                  N                  ,                  M                                )                                              ⁢                                    ∑                              y                =                0                                            N                -                1                                      ⁢                                          ∑                                  x                  =                  0                                                  M                  -                  1                                            ⁢                                                f                  ⁡                                      (                                          x                      ,                      y                                        )                                                  ⁢                                  cos                  ⁡                                      (                                                                  π                        N                                            ⁢                                              (                                                  y                          +                                                      1                            2                                                                          )                                            ⁢                      s                                        )                                                  ⁢                                  cos                  ⁡                                      (                                                                  π                        M                                            ⁢                                              (                                                  x                          +                                                      1                            2                                                                          )                                            ⁢                      t                                        )                                                                                                          Equation        ⁢                                  ⁢        2            where:                N is the number of samples in the vertical direction        M is the number of samples in the horizontal direction.        
Typically N and M are the same and the sample is a square.
Implementation of ROP3s involves retaining a state of the drawing commands, and then determining if the state defines transparency simulation. A problem with this approach is that it requires extra processing outside the normal rendering pipeline and extra memory to store the state information.
Furthermore, a drawing command may contain, for example, a raster (image) object with a large pattern of alternating tiles. The image may be thousands of pixels in width and height, but only have repeating tiles of 10s of pixels. Such an image typically consumes significant memory and thus may affect the performance of the renderer.
It is desirable to efficiently reverse or reduce the effects of transparency simulation. It is also desirable to simplify rendering of images with alternating tiles.